'This utility reveals the passwords behind the asterisks in the Internet Explorer windows. (version 5.x and above only)
'It scans all opened Internet Explorer windows on your system, and reveals the passwords behind the asterisks in all password-boxes that appears in the web pages.
'License:
'This utility is released as freeware.
'You are allowed to freely distribute this utility via floppy disk, CD-ROM,
'Internet, or in any other way, as long as you don't charge anything for this.
'If you distribute this utility, you must include all files in the distribution
'package including the source code, without any modification !
'You are not allowed to combine this utility with a commercial product in any way !
Private strCurrTitle As String
'This function checks if we can access the Document object without errors.
Private Function CanAccessDocumentObject(Obj As Object) As Boolean
Dim oDocument As Object
On Error GoTo err1:
Set oDocument = Obj.document
Set oDocument = Nothing
CanAccessDocumentObject = True
Exit Function
err1:
CanAccessDocumentObject = False
End Function
Private Function IsPasswordBox(objElement As Object) As Boolean
On Error GoTo err1
If LCase(objElement.getAttribute("Type")) = "password" Then
IsPasswordBox = True
Else
IsPasswordBox = False
End If
Exit Function
err1:
IsPasswordBox = False
End Function
Private Function SearchPasswordsInDoc(objDoc As Object) As Boolean
Dim objElement As Object
Dim lngLen As Long
Dim lngIndex As Long
Dim blnFound As Boolean
'Get the number of elements in the document.
lngLen = objDoc.All.length
'Enumerates all elements in the document, in order to find the password elements.
For Each objElement In objDoc.All
DoEvents
'Checks if the element is a password-box.
If IsPasswordBox(objElement) Then
'We found a password-box, so we reveal it together with window title.